<!doctype html>
<html lang="en" dir="ltr">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta http-equiv="Content-Language" content="en" />
  <meta name="msapplication-TileColor" content="#2d89ef">
  <meta name="theme-color" content="#4188c9">
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="mobile-web-app-capable" content="yes">
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <link rel="icon" href="./favicon.ico" type="image/x-icon" />
  <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
  <title>首页</title>
  <script src="./assets/js/require.min.js"></script>
  <script src="./assets/js/owner_work.js"></script>
  <link href="./assets/css/dashboard.css" rel="stylesheet" />
  <script src="./assets/js/dashboard.js"></script>
  <style>
    .showTime{
      position: absolute; 
      color: aliceblue; 
      width: 100%;
      height: 100%;
      text-align: center;
      margin-top: 20%;
    }
  </style>
</head>

<body class="">
  <div class="" role="alert" id="alert_tip">
    <i class="" aria-hidden="true"></i> <span> </span>
  </div>
  <div class="page">
    <div class="flex-fill">
      <div class="header py-4">
        <div class="container">
          <div class="d-flex">
            <a class="header-brand" href="./index.html">
              <h2 class="mt-0 mb-4">Owner-work</h2>
            </a>
            <div class="d-flex order-lg-2 ml-auto">
              <div class="nav-item d-none d-md-flex">
                <a href="#" class="btn btn-sm btn-outline-primary" target="_blank">Source code</a>
              </div>
              <div class="dropdown">
                <a href="#" class="nav-link pr-0 leading-none" data-toggle="dropdown">
                  <span class="avatar avatar-lg" ></span>
                  <span class="ml-2 d-none d-lg-block">
                    <span class="text-default" id="userName"> </span>
                    <small class="text-muted d-block mt-1">Administrator</small>
                  </span>
                </a>
                <div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
                  <a class="dropdown-item" href="./user_info.html">
                    <i class="dropdown-icon fe fe-user"></i> 个人信息
                  </a>
                  <a class="dropdown-item" href="#">
                    <i class="dropdown-icon fe fe-settings"></i> 设置
                  </a>
                  <a class="dropdown-item" href="./email_change.html">
                    <i class="dropdown-icon fe fe-mail"></i> 更改邮箱
                  </a>
                  <a class="dropdown-item" href="./password_change.html">
                    <i class="dropdown-icon fe fe-send"></i> 更改密码
                  </a>
                  <div class="dropdown-divider"></div>
                  <a class="dropdown-item" href="./faq.html" target="_blank">
                    <i class="dropdown-icon fe fe-help-circle"></i> 需要帮助?
                  </a>
                  <a class="dropdown-item" href="#" onclick="loginOut()">
                    <i class="dropdown-icon fe fe-log-out"></i> 退出
                  </a>
                  <!-- <a class="dropdown-item" href="#">
                    <span class="float-right"><span class="badge badge-primary">6</span></span>
                    <i class="dropdown-icon fe fe-mail"></i> Inbox
                  </a> -->
                </div>
              </div>
            </div>
            <a href="#" class="header-toggler d-lg-none ml-3 ml-lg-0" data-toggle="collapse"
              data-target="#headerMenuCollapse">
              <span class="header-toggler-icon"></span>
            </a>
          </div>
        </div>
      </div>
      <div class="header collapse d-lg-flex p-0" id="headerMenuCollapse">
        <div class="container">
          <div class="row align-items-center">
            <div class="col-lg order-lg-first">
              <ul class="nav nav-tabs border-0 flex-column flex-lg-row">
                <li class="nav-item">
                  <a href="./index.html" class="nav-link active"><i class="fe fe-cloud"></i> 首页</a>
                </li>
                <li class="nav-item dropdown">
                  <a href="./company.html" class="nav-link "><i class="fe fe-cloud-drizzle"></i> 公司管理</a>
                </li>
                <li class="nav-item">
                  <a href="./company_data.html" class="nav-link"><i class="fe fe-cloud-lightning"></i>账户管理 </a>
                </li>
                <li class="nav-item">
                  <a href="./logger.html" class="nav-link"><i class="fe fe-cloud-rain"></i> 操作日志</a>
                </li>
                <!-- <li class="nav-item">
                    <a href="javascript:void(0)" class="nav-link" data-toggle="dropdown"><i class="fe fe-box"></i> Interface</a>
                    <div class="dropdown-menu dropdown-menu-arrow">
                      <a href="./cards.html" class="dropdown-item ">Cards design</a>
                      <a href="./charts.html" class="dropdown-item ">Charts</a>
                      <a href="./pricing-cards.html" class="dropdown-item ">Pricing cards</a>
                    </div>
                  </li> -->
              </ul>
            </div>
          </div>
        </div>
      </div>
      <div class="col col-text mx-auto" style="margin-top: 3%;">
        <div id="carousel-indicators" class="carousel slide" data-ride="carousel">
          <div class="carousel-inner">
            <div class="carousel-item active">
              <h1 class="showTime" id="showTime"> </h1>
              <img class="d-block w-100" alt="" src="./demo/photos/jakob-owens-224352-1500.jpg" data-holder-rendered="true">
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="footer">
      <div class="container">
        <div class="row">
          <div class="col-lg-8">
            <div class="row">
              <div class="col-6 col-md-3">
                <ul class="list-unstyled mb-0">
                  <li><a href="https://www.zhihu.com/" target="_blank">知乎</a></li>
                  <li><a href="https://juejin.im/" target="_blank">掘金</a></li>
                </ul>
              </div>
              <div class="col-6 col-md-3">
                <ul class="list-unstyled mb-0">
                  <li><a href="https://www.baidu.com/" target="_blank">百度</a></li>
                  <li><a href="https://cn.aliyun.com/" target="_blank">阿里云</a></li>
                </ul>
              </div>
            </div>
          </div>
          <div class="col-lg-4 mt-4 mt-lg-0">
            这是一个基于 <a href="https://github.com/tabler/tabler" target="_blank">tabler</a> 的开源项目，感谢他的无私奉献！<br>
            本项目出于学习的目的，免费、开源，欢迎大家使用。
          </div>
        </div>
      </div>
    </div>
    <footer class="footer">
      <div class="container">
        <div class="row align-items-center flex-row-reverse">
          <div class="col-auto ml-lg-auto">
            <div class="row align-items-center">
              <div class="col-auto">
                <ul class="list-inline list-inline-dots mb-0">
                  <li class="list-inline-item"><a href="./faq.html" target="_blank">FAQ</a></li>
                </ul>
              </div>
              <div class="col-auto">
                <a href="https://github.com/tabler/tabler" class="btn btn-outline-primary btn-sm" target="_blank">Source code</a>
              </div>
            </div>
          </div>
          <div class="col-12 col-lg-auto mt-3 mt-lg-0 text-center">
            Copyright © 2020 <a href="./index.html">Owner-work</a>. 有任何问题，请发送邮件至邮箱 heliangyuan10#163.com (#换成@).
          </div>
        </div>
      </div>
    </footer>
  </div>
</body>
<script>
  require(["jquery"], function($){
    $("#userName")[0].innerText = localStorage.UserName
    if (localStorage.UserHeadImg!=null && localStorage.UserHeadImg!="null" && localStorage.UserHeadImg!=""){
      $(".avatar.avatar-lg").css("background-image", "url("+ localStorage.UserHeadImg +")")
    }else{
      $(".avatar.avatar-lg").css("background-image", "url(./demo/faces/male/44.jpg)")
    }
    time()
    getUserInfo()
  })

  function time(){
    dt = new Date();
    var time=new Date();  
      var year=time.getFullYear();  //获取年份  
      var month=time.getMonth()+1;  //获取月份  
      var day=time.getDate();   //获取日期  
      var hour=checkTime(time.getHours());   //获取时  
      var minite=checkTime(time.getMinutes());  //获取分  
      var second=checkTime(time.getSeconds());  //获取秒  
      /****当时、分、秒、小于10时，则添加0****/  
      function checkTime(i){  
          if(i<10) return "0"+i;  
          return i;  
      }  
      document.getElementById("showTime").innerHTML =  hour + ":" + minite + ":" + second;//进行组合
      setTimeout("time()",1000); //设定定时器，循环运行
  }

    // 获取用户个人信息
    function getUserInfo(){
    $("#dimmer_body").addClass("active")
    $.ajax(localStorage.BaseUrl + "/user/information", {
      headers: {
        Authorization: localStorage.Token
      },
      method: "GET"
    }).done(function(data){
      console.log(data)
      checkUserToken(data["status"], data["msg"])
      if (data["status"] == 1) {
        // localStorage.UserName = data["data"]["user_name"]
        // localStorage.UserHeadImg = data["data"]["user_head_img"]

      } else {
        showAlert("fe-alert-triangle", data["msg"], "alert-danger")
      }
    }).fail(function(xhr, status){
      if (status == "error") {
        showAlert("fe-alert-triangle", `服务器错误！`, "alert-danger")
      }
    }).always(()=>{
      $("#dimmer_body").removeClass("active")
    })
  }

</script>

</html>